home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’95
/
CantTouchThis
/
ScriptableFinder.h
< prev
next >
Wrap
Text File
|
1995-06-24
|
2KB
|
44 lines
// constants used as parameters for the GetFinderProcess routine
#define kAbsoluteFinderPSN FALSE // disallow comparison for current process serial number
#define kRelativeFinderPSN TRUE // allow comparison for current process serial number
// constants used as parameters for the ScriptableFinder calling routines
#define kDontUseSystemMode FALSE // don't use System Mode for sending the AppleEvent
#define kUseSystemMode TRUE // use System Mode for sending the AppleEvent
// Finder type/creator
#define kFinderType 'FNDR'
#define kFinderSignature 'MACS'
typedef FSSpecArrayPtr *FSSpecArrayHandle;
// Special undocumented routines for system mode - you really DON'T want to use these
extern pascal OSErr TurnSystemModeOn(void)
FOURWORDINLINE(0x2F3C, 0x0040, 0x0000, 0xA88F);
extern pascal OSErr TurnSystemModeOff(void)
FOURWORDINLINE(0x2F3C, 0x0041, 0x0000, 0xA88F);
// My own exported routines
OSErr AddToFSSpecArrayHandle (FSSpec *f, FSSpecArrayHandle fah);
OSErr GetFinderProcess (ProcessSerialNumber *finderpsn, Boolean shortcut);
Boolean IsRelativeProcessSerialNumber (ProcessSerialNumber *psn);
OSErr GetScriptableFinderSelection (FSSpecArrayHandle *fah, Boolean usesystemmode);
OSErr SetScriptableFinderSelection (FSSpecArrayHandle fah, Boolean usesystemmode,
AESendMode sendmode);
OSErr RevealScriptableFinderSelection (FSSpecArrayHandle fah, Boolean usesystemmode,
AESendMode sendmode);
OSErr OpenScriptableFinderSelection (FSSpecArrayHandle fah, Boolean usesystemmode,
AESendMode sendmode, FSSpec *usingf);
OSErr PrintScriptableFinderSelection (FSSpecArrayHandle fah, Boolean usesystemmode,
AESendMode sendmode);
OSErr UpdateScriptableFinderContainer (FSSpec *f, Boolean usesystemmode, AESendMode sendmode);
OSErr SetScriptableFinderFileIcon (FSSpec *f, Handle iconFamily, Boolean usesystemmode,
AESendMode sendmode);